package com.bigdata.flink.util;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

public class StreamEnvUtil {
    private static final String companyHost = "172.16.19.23";
    private static final String localHost = "192.168.124.6";

    public static StreamExecutionEnvironment getEnv() {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        return env;
    }

    public static DataStreamSource<String> getSocketSource(StreamExecutionEnvironment env) {
        return env.socketTextStream(localHost, 9999);
    }
}
